package com.zpy.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "services")
public class ServicesConfig {
    private ServiceConfig iotdb = new ServiceConfig();
    private ServiceConfig mqtt = new ServiceConfig();
    private ServiceConfig netty = new ServiceConfig();

    public static class ServiceConfig {
        private boolean enabled = false;

        public boolean isEnabled() {
            return enabled;
        }

        public void setEnabled(boolean enabled) {
            this.enabled = enabled;
        }
    }

    public ServiceConfig getIotdb() {
        return iotdb;
    }

    public void setIotdb(ServiceConfig iotdb) {
        this.iotdb = iotdb;
    }

    public ServiceConfig getMqtt() {
        return mqtt;
    }

    public void setMqtt(ServiceConfig mqtt) {
        this.mqtt = mqtt;
    }

    public ServiceConfig getNetty() {
        return netty;
    }

    public void setNetty(ServiceConfig netty) {
        this.netty = netty;
    }
}